﻿using System.Collections.Generic;
using System.Linq;
using MM.Contract.Movies;
using MM.Domain;
using NHibernate;

namespace MM.Persistence.NH.Repositories
{
    public class MovieRepository : Repository<Movie>, IMovieRepository
    {

        public MovieRepository(ISessionFactory factory ) : base(factory)
        {}

        #region Miembros de IMovieRepository

        public IList<Movie> GetAllMovies()
        {
            return Session.CreateCriteria<Movie>().List<Movie>();
        }

        #endregion
    }
}
